home *** CD-ROM | disk | FTP | other *** search
/ Dynamic HTML Construction Kit / Dynamic HTML Construction Kit.iso / source_code / dhtmlunl / dhtml.exe / CD Content / Chap15 / dun15_11.txt < prev    next >
Encoding:
Text File  |  1997-12-18  |  2.0 KB  |  62 lines

  1. <HTML>
  2. <HEAD>
  3.   <TITLE>Exposing Style Sheets in IE4</TITLE>
  4.  
  5.   <STYLE>
  6.     DT               { padding-top: 12; }
  7.     FONT             { font-family: arial, helvetica, sans-serif; }
  8.     .layer           { position: absolute; }
  9.     #banner          { background-color: yellow; }
  10.   </STYLE>
  11. </HEAD>
  12.  
  13. <BODY ID=body STYLE="background-color: white; font-size: 12pt;">
  14.   <BLOCKQUOTE>
  15.  
  16.   <P><IMG ID=arrow SRC="arrow.gif" STYLE="border: 0;">
  17.  
  18.   <DIV ID=banner CLASS=layer STYLE="color: blue; left: 72; top: 15;">
  19.     <FONT CLASS=pageTitle SIZE=+2>
  20.       Exposing Style Sheets in IE4
  21.     </FONT>
  22.   </DIV>
  23.  
  24.   <BR><BR>
  25.   Each page element object contains a <TT>style</TT> object
  26.   that reflects the inline styles applied to that element object.
  27.   The following are the style properties reflected into style
  28.   objects for some of the elements on this page:</P>
  29.  
  30.   <BLOCKQUOTE><DL>
  31.   <SCRIPT>
  32.     document.writeln("<DT><B>BODY</B></DT>");
  33.     document.writeln("<DD><B>background-color:</B> ");
  34.     document.writeln(document.all.body.style.backgroundColor);
  35.     document.writeln("</DD>");
  36.     document.writeln("<DD><B>font-size:</B> ");
  37.     document.writeln(document.all.body.style.fontSize);
  38.     document.writeln("</DD>");
  39.  
  40.     document.writeln("<DT><B>DIV</B></DT>");
  41.     document.writeln("<DD><B>color:</B> ");
  42.     document.writeln(document.all.banner.style.color);
  43.     document.writeln("</DD>");
  44.     document.writeln("<DD><B>left:</B> ");
  45.     document.writeln(document.all.banner.style.left);
  46.     document.writeln("</DD>");
  47.     document.writeln("<DD><B>top:</B> ");
  48.     document.writeln(document.all.banner.style.top);
  49.     document.writeln("</DD>");
  50.  
  51.     document.writeln("<DT><B>IMG</B></DT>");
  52.     document.writeln("<DD><B>border:</B> ");
  53.     document.writeln(document.all.arrow.style.border);
  54.     document.writeln("</DD>");
  55.  
  56.   </SCRIPT>
  57.   </DL></BLOCKQUOTE>
  58.  
  59.   </BLOCKQUOTE>
  60. </BODY>
  61. </HTML>
  62.